package it.paceGiuseppe.sols.ciambelle;

public class Impastatrice {

	public static final int C_MAX = 10;
	
	private int numeroIngredienti = 0;
	
	public void incrementaIngredienti() throws IllegalStateException
	{
		numeroIngredienti++;
		

		if(numeroIngredienti > C_MAX)
			throw new IllegalStateException();
		
		System.out.println("Aggiunto ingrediente");
	}
	
	public void svuota() throws IllegalAccessException
	{
		if(numeroIngredienti != C_MAX)
			throw new IllegalAccessException();
		
		
		System.out.println("Svuotamento macchina");
		
		numeroIngredienti = 0;
	}
}
